/* AI推荐页面样式 */
.recommendation-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow-x: hidden;
}

.recommendation-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 0;
}

.recommendation-container > * {
    position: relative;
    z-index: 1;
}

/* 页面标题区域 */
.recommendation-header {
    padding: 40px 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.recommendation-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.recommendation-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.category-highlight {
    color: #ffd700;
    font-weight: 600;
}

/* 内容区域 */
.recommendation-content {
    padding: 40px 0 80px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    backdrop-filter: blur(20px);
    min-height: calc(100vh - 200px);
}

/* 加载动画 */
.loading-section {
    text-align: center;
    padding: 80px 20px;
}

.loading-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.ai-brain {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    animation: brainPulse 2s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

@keyframes brainPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.loading-text h4 {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 10px;
}

.loading-text p {
    color: #718096;
    margin: 0;
}

.loading-tips {
    margin-top: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.loading-tips small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.page-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-title .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 统计卡片 */
.recommendation-stats {
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.stat-info p {
    color: #718096;
    margin: 0;
    font-weight: 500;
}

/* 推荐信息区域 */
.recommendation-info {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.recommendation-info .text-muted {
    font-size: 0.95rem;
    line-height: 1.5;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.info-item {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.info-item .icon {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.info-item .label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.info-item .value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

/* 推荐设置 */
.recommendation-settings {
    margin-bottom: 2rem;
}

.settings-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.settings-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 25px;
    color: white;
}

.settings-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.settings-content {
    padding: 25px;
}

.preference-option {
    margin-bottom: 1rem;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

.form-check-label {
    font-size: 1rem;
    cursor: pointer;
}

.recommendation-count .form-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.recommendation-count .form-select {
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    padding: 10px 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.recommendation-count .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

/* 操作按钮区域 */
.recommendation-actions {
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.selection-controls .btn {
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-buttons .btn-success {
    border-radius: 15px;
    padding: 12px 30px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.action-buttons .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

/* 开始推荐区域 */
.start-recommendation-section {
    margin-bottom: 2rem;
}

/* 开始推荐界面 */
.start-recommendation-section {
    text-align: center;
    padding: 40px 20px;
}

.start-card {
    background: white;
    border-radius: 25px;
    padding: 50px 40px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.start-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.start-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2.5rem;
    color: white;
    animation: startIconPulse 3s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

@keyframes startIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.start-card h4 {
    color: #2d3748;
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.start-description {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.start-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border-left: 4px solid #667eea;
    font-weight: 500;
    color: #4a5568;
}

.start-btn {
    border-radius: 20px;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    min-width: 250px;
}

.start-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.start-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

/* 推荐网站网格 */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* 推荐卡片 */
.recommendation-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.recommendation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.recommendation-card.selected {
    border-color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(40, 167, 69, 0.1) 100%);
}

.recommendation-card.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745, #20c997);
}

/* 卡片头部 */
.recommendation-card .card-header {
    padding: 20px 25px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.selection-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #dee2e6;
    cursor: pointer;
}

.selection-checkbox input[type="checkbox"]:checked {
    background-color: #28a745;
    border-color: #28a745;
}

.website-score {
    position: relative;
}

.score-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.score-excellent { background: linear-gradient(135deg, #28a745 0%, #20c997 100%); }
.score-good { background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%); }
.score-average { background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%); }
.score-poor { background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%); }

/* 卡片主体 */
.recommendation-card .card-body {
    padding: 20px 25px;
}

.website-info {
    margin-bottom: 20px;
}

.website-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.website-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    line-height: 1.3;
}

.website-icon {
    position: absolute;
    top: 15px;
    right: 60px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.website-url {
    margin-bottom: 15px;
}

.website-url a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.website-url a:hover {
    color: #764ba2;
}

.website-description {
    color: #718096;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* 推荐理由 */
.recommendation-reason {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(102, 126, 234, 0.1) 100%);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
    position: relative;
}

.reason-label {
    color: #667eea;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reason-text {
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

/* 卡片底部 */
.recommendation-card .card-footer {
    padding: 0 25px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 20px;
    padding-top: 20px;
}

.card-footer .btn {
    border-radius: 15px;
    font-size: 0.85rem;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.card-footer .btn-outline-primary {
    border-color: #667eea;
    color: #667eea;
}

.card-footer .btn-outline-primary:hover {
    background-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

.card-footer .btn-outline-info {
    border-color: #17a2b8;
    color: #17a2b8;
}

.card-footer .btn-outline-info:hover {
    background-color: #17a2b8;
    color: white;
    transform: translateY(-2px);
}

/* 错误状态 */
.error-section {
    text-align: center;
    padding: 3rem 1rem;
}

.error-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.error-icon {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-card h4 {
    color: #333;
    margin-bottom: 1rem;
}

.error-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* 成功提示 */
.success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-content {
    display: flex;
    align-items: center;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ai-recommendation-container {
        padding: 1rem 0;
    }
    
    .page-title h2 {
        font-size: 2rem;
    }
    
    .recommendations-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .recommendation-card {
        padding: 1rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .start-features {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .website-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .website-icon {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .recommendation-content {
        padding: 0 0.5rem;
    }
    
    .recommendation-card {
        padding: 0.75rem;
    }
    
    .card-footer {
        flex-direction: column;
    }
    
    .card-footer .btn {
        width: 100%;
    }
} 